﻿using System;
using System.Collections;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Windows;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Collections.Specialized;
using System.Xml.Serialization;
using System.IO;

namespace for7raid.VSSpellerAddin
{

    public static partial class Extensions
    {

      

        public static bool In(this string elem, params string[] array)
        {
            foreach (string t in array)
                if (elem.Contains(t)) return true;
            return false;
        }

        public static bool In<T>(this T elem, params T[] array)
        {
            foreach (T t in array)
                if (t.Equals(elem)) return true;
            return false;
        }

        public static string Return(this string o,
                         string failureValue)
        {
            if (string.IsNullOrEmpty(o)) return failureValue;
            return o;
        }
    }

}
